import request from '@/utils/request'

// 获取部门负责人列表
export const getDepPrincipalApi = () => {
  return request.get('/sys/user/simple')
}

// 获取员工数据
export const getEmployeeDateApi = (page, size) => {
  return request.get('/sys/user', {
    params: {
      page,
      size
    }
  })
}

// 删除员工
export const delEmployeeDateApi = (id) => {
  return request.delete(`/sys/user/${id}`)
}

// 新增员工
export const postEmployee = (data) => {
  return request.post('/sys/user', data)
}

// 批量新增员工接口
export const batchAddEmployeeApi = (data) => {
  return request.post('/sys/user/batch', data)
}

// 修改员工信息
export const saveEmployeeInfoApi = (data) => {
  return request.put(`/sys/user/${data.id}`, data)
}

